<?php
/**
Exibe as informa��es que foram inseridas no formul�rio de cadastro do Programa.
Ap�s confirmada, as informa��es ser�o inseridas no banco de dados.
*/

if( !function_exists('__autoload') )
{
    function __autoload($class_name) {
    require_once $class_name . '.php';
    }
}


// dados do formul�rio vindos de CadastrarFonte.php
$anoId 		   = $_POST['anoId']; 
$programaId    = $_POST['programaId'];
$tipoDespesa   = $_POST['tipoDespesa'];
$fonteRecurso  = $_POST['fonteRecurso'];
$valorFonte    = $_POST['valorFonte']; 

$ano = new Ano();
$anoSelecionado = $ano->CarregarAno( $anoId );

$programa = new Programa();
$programaSelecionado = $programa->CarregarPrograma( $programaId );

?>
<html>
           <head>
           <title>SAEO - Confirmar Cadastro da Fonte </title>
           <link rel='stylesheet' type='text/css' href='templates/estilos.css'>
           </head>
     <body class='body' ">
     <form name='confirmar_cadastro_fonte' action='EnviarDadosFonte.php?operacao=1' method='post'>
     <table width='779' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#FFFFFF'>
            <tr>
				<td><?php include "Topo.php"; ?> </td>
			</tr>
            <tr>
                <td><div class='titulosTabelas' style='width:779; height:20; background:url(templates/tabela.jpg)'>CONFIRMAR CADASTRO DA FONTE DE RECURSO</div></td>
            </tr>
            <tr>
                <td colspan='2'>&nbsp;</td>
            </tr>
            <tr>
                <td><table class='tabela' width='650' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#FFFFFF'>
                           <tr>
                               <td>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='30%'>&nbsp;Ano:</td>
                               <td class='textoTabelas'><?php echo $anoSelecionado->ano ?></td>
                               <input type='hidden' name='anoId' value='<?php echo $anoId ?>'>
                           </tr>
                           <tr>
                               <td>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='30%'>&nbsp;Programa de Trabalho:</td>
                               <td class='textoTabelas'><?php  echo $programaSelecionado->nome; ?></td>
                               <input type='hidden' name='programaId' value='<?php echo $programaId ?>'>
                           </tr>
                           <tr>
                               <td>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='30%'>&nbsp;Tipo de Despesa:</td>
                               <td class='textoTabelas'><?php echo ($tipoDespesa == 33)?"33 - Corrente" : "44 - Capital" ?></td>
                               <input type='hidden' name='tipoDespesa' value='<?php echo $tipoDespesa ?>'>
                           </tr>                           
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas'>&nbsp;Fonte de Recurso:</td>
                               <td class='textoTabelas'><?php echo $fonteRecurso ?></td>
                               <input type='hidden' name='fonteRecurso' value='<?php echo $fonteRecurso ?>'>
                           </tr>
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas'>&nbsp;Valor:</td>
                               <td class='textoTabelas'><?php echo $valorFonte ?></td>
                               <input type='hidden' name='valorFonte' value='<?php echo $valorFonte ?>'>
                           </tr>                           
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td colspan='2' height='46'><div style='position:relative;left:220px'><img style='width:100px;height:30px;cursor:pointer;' src='templates/btvoltar.JPG' onclick='javascript: history.go(-1);'>&nbsp
                               <input type='image' style='width:100px;height:30px;' src='templates/btavancar.JPG'/></div></td>
                           <tr>
                     </table>
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
            <tfoot>
           <tr>
                <td colspan='2'>&nbsp;</td>
            </tr>
                   <tr><?php include 'rodapeCreditos.php'; ?></tr>
            </tfoot>
     </table>
     </form>
     </body>
     </html>